-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: code should be compressed in production #4254
Conversation
…TAGE_OPTIMIZE_COMPATIBILITY
🦋 Changeset detectedLatest commit: d30b54c The changes in this PR will be included in the next version bump. This PR includes changesets to release 215 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4254 +/- ##
==========================================
- Coverage 57.59% 56.28% -1.32%
==========================================
Files 672 662 -10
Lines 17794 18032 +238
Branches 3876 3940 +64
==========================================
- Hits 10249 10149 -100
- Misses 6934 7219 +285
- Partials 611 664 +53 ☔ View full report in Codecov by Sentry. |
If we get the source in the OPTIMIZE_COMPATIBILITY stage, the code is not compressed yet, which results in uncompressed code in the chunk. So here we get the source from the DEV_TOOLING stage.
When we use esbuild transform, code should be compressed in production.
Summary
🤖 Generated by Copilot at df23017
This pull request patches the
@modern-js/app-tools
package to use a more appropriate stage for the router plugin. This improves the development experience and the output quality of the bundler.Details
🤖 Generated by Copilot at df23017
@modern-js/app-tools
and provide a fix message (link)RouterPlugin
class toPROCESS_ASSETS_STAGE_DEV_TOOLING
for better performance and correctness (link)Related Issue
Checklist
pnpm run change
.